<% layout('/layouts/default.html', {title: '登录', libs: ['validate'], bodyClass: 'login-page'}){ %>
<% include('/include/upgrade.html'){} // 如果客户浏览器版本过低，则显示浏览器升级提示。 %>
<link rel="stylesheet" href="${ctxStatic}/icheck/1.0/square/blue.css?${_version}">
<link rel="stylesheet" href="${ctxStatic}/jquery-toastr/2.0/toastr.min.css?${_version}">
<link rel="stylesheet" href="${ctxStatic}/modules/sys/sysLogin.css?${_version}">
<% var productName = @Global.getConfig('productName'), productVersion = @Global.getConfig('productVersion'); %>
<div class="login-box">
	<div class="login-logo" title="${productName}">
		<a href="${ctx}/login"><b>${productName}</b> <small>${productVersion}</small></a>
	</div>
	<div class="login-box-body">
		<#form:form id="loginForm" model="${user!}" action="${ctx}/login" method="post">
			<div class="form-group has-feedback">
				<span class="glyphicon glyphicon-user form-control-feedback" title="登录账号"></span>
				<#form:input type="text" name="username" class="form-control required"
					data-msg-required="请填写登录账号." placeholder="登录账号"
					value="${cookie('rememberUserCode')}"/>
			</div>
			<div class="form-group has-feedback">
				<span class="glyphicon glyphicon-lock form-control-feedback"
					title="登录密码，鼠标按下显示密码"
					onmousedown="$('#password').attr('type','text')"
					onmouseup="$('#password').attr('type','password')"></span>
				<#form:input type="password" name="password" class="form-control required"
					data-msg-required="请填写登录密码." placeholder="登录密码" autocomplete="off"/>
			</div>
			<%/*<!-- if(@ObjectUtils.toBoolean(@Global.getConfig('user.useCorpModel'))){ %>
			<div class="form-group has-feedback">
				<select name="param_corpCode" class="form-control">
					<% for(var user in @UserUtils.findCorpList()){ %>
						<option value="${user.corpCode}">(${user.corpCode}) ${user.corpName}</option>
					<% } %>
				</select>
			</div>
			<% }  -->*/%>
			<div class="form-group has-feedback" id="isValidCodeLogin" style="display:${isValidCodeLogin?'blank':'none'}">
				<#form:validcode name="validCode" isRequired="true" isRemote="true" isLazy="false"/>
			</div>
			<div class="form-group">
				<div class="mt5 icheck">
					<label title="公共场所慎用,下次不需要再填写帐号"><input type="checkbox"
						name="rememberUserCode"${isNotBlank(cookie('rememberUserCode'))?' checked':''}
						class="form-control" data-style="square-blue"> 记住账号</label> &nbsp; 
					<label title="公共场所慎用,下次不需要再填写帐号和密码"><input type="checkbox"
						name="rememberMe"${isNotBlank(cookie('rememberMe'))?' checked':''}
						class="form-control" data-style="square-blue"> 记住密码</label>
				</div>
			</div>
			<div class="form-group">
				<button type="submit" class="btn btn-primary btn-block btn-flat">立即登录</button>
			</div>
		</#form:form>
		<div class="row">
			<div class="col-xs-12">
				<% if(@ObjectUtils.toBoolean(@Global.getConfig('user.registerUser'))){ %>
				<a href="${ctxPath}/account/registerUser" class="pull-right">注册账号</a><% } %>
				<a href="${ctxPath}/account/forgetPwd" class="pull-left">忘记密码</a>
			</div>
		</div>
	</div>
	<div class="login-copyright">
		版权所有 &copy; ${@DateUtils.getYear()} ${productName} - Powered By <a href="http://jeesite.com">JeeSite</a>.
	</div>
</div>
<% } %>
<script>var secretKey = '${@Global.getConfig("shiro.loginSubmit.secretKey")}';</script>
<script src="${ctxStatic}/jquery-toastr/2.0/toastr.min.js?${_version}"></script>
<script src="${ctxStatic}/common/des.js?${_version}"></script>
<script src="${ctxStatic}/modules/sys/sysLogin.js?${_version}"></script>